Homebrew 101


It is assumed you already can run DS code with an EZ4 (i.e. you have a passme(2), nopass or modded firmware).

First things first
EZ4 homebrew likes to be in the .ds.gba format, that is to say a GBA header added. There are a multitude of ways to do this:
Simple way
Use http://www.4shared.com/file/2228491/ef07d789/dsbuild.html to patch the file (drag and drop), it is part of devkitpro but grabbing a 20 meg kit for a tiny 8kb file it not reallt worth it.
Other way
Download ndsmall.bin from http://darkfader.net/ds/ (many other sites have it as well)
Open a dos prompt and type or paste the following changing names:

copy /b ndsmall.bin+homebrew.nds newhomebrew.ds.gba


Bear in mind .sc.nds is the same thing just with a different extension.

SRAM: EZ4 Specific. Various homebrew uses the SRAM to save data (not so much now DLDI (explained below) appeared), typically they do not have the EZ4 "SRAM bits" added to the header. Read this thread (second page especially):
http://ezflash.sosuke.com/viewtopic.php?t=2801&start=0

DLDI:
Anyone who was into homebrew as recently as november last year would have had the fun of having to build their homebrew (assuming source was available and knowledge was had) to get card access. Mimicking moonshells end user patching Libfat (the de facto library for all this) added DLDI (dynamically linked device interface) to allow end users to patch their own homebrew for their cart (taking a huge burden from both coders and end users).

The EZ4 has two patches (included in the zip):
http://chishm.drunkencoders.com/DLDI/
and
http://nds.cmamod.com/ez4/ez4sd_alt_dldi.zip
Read either this:
http://ezflash.sosuke.com/wiki/index.php?title=DLDI
or this:
http://ezflash.sosuke.com/viewtopic.php?t=3466
or even the original page.
The second link is more for slower carts.

Oh and you can add a header and then DLDI patch or DLDI patch and add a header, should the homebrew be DLDI patched already then that is OK.